//package com.zjx.postprocessor;
//
//import com.zjx.entity.User;
//import org.springframework.beans.BeansException;
//import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
//import org.springframework.beans.factory.support.BeanDefinitionBuilder;
//import org.springframework.beans.factory.support.BeanDefinitionRegistry;
//import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
//import org.springframework.beans.factory.support.GenericBeanDefinition;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.PriorityOrdered;
//
///**
// * @author zjx
// * @create 2020-04-06 13:18
// */
//@Configuration
//public class CustomizeBeanDefinitionRegistryPostProcessors implements BeanDefinitionRegistryPostProcessor , PriorityOrdered {
//
//	@Override
//	public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
//		Class<?> clazz = User.class;
//		BeanDefinitionBuilder builder=BeanDefinitionBuilder.genericBeanDefinition(clazz);
//		GenericBeanDefinition definition=(GenericBeanDefinition)builder.getRawBeanDefinition();
//		registry.registerBeanDefinition("user5",definition);
//	}
//
//	@Override
//	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
//
//	}
//
//	@Override
//	public int getOrder() {
//		//数字越小优先级越高
//		return 0;
//	}
//}
